<template>

<mt-swipe id="topBanner" :showIndicators="true" :auto="0" class="banner-list" :style="{height : `${imgStyle.h}px`}">
    <mt-swipe-item v-for="(banner,index) in imgList" :key="index">
         <div class="bg-img-clip" :style="{width : '100%', height : `${imgStyle.h}px`,backgroundImage:`url(${banner.url})`}"></div>
    </mt-swipe-item>
</mt-swipe>


</template>
<style>

</style>
<script>
  import Util from "util";


    export default{
      name  : "topBanner",
      props : {
        imgList : Array,
        ratio   : Number
      },

     beforeCreate : function(){

     },

      computed : {
         imgStyle : function(){
           var ratio  = this.ratio;
           return Util.Location.ratioElementForWindow(ratio);
        }
      },
        data(){
            return{
                msg:'hello vue'
            }
        },
        components:{

        }
    }
</script>
